<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="themes01/default/clientPublic.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/codeMgr.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/tabSwitch.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="themes01/default/pstyle.css">
<script type="text/javascript" src="javascripts01/jquery.js"></script>
<script type="text/javascript" src="javascripts01/common.js"></script>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<title>Office 515158 2011 OA办公系统</title>
 
</head>
<body>
<div id="Holder">
<div id="MainPage">

 
 
<div id="Subnav">
 
<ul>
<?php
$nums=22;
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."menu where fatherid='3' and menutype='0' ORDER BY menunum Asc");
	while ($row = $db->fetch_array($query)) {
?>
<li><a href="<?=$row[menuurl]?>"  <? if($nums==$row[menuid]){?> id="Subnavb"<? }?>><?=$row[menuname]?></a></li>
<?php
	}
?>


</ul>
</div>
<script Language="JavaScript"> 
function CheckForm()
{
   if(document.save.startdate.value=="")
   { alert("开始日期不能为空！");
     document.save.startdate.focus();
     return (false);
   }
   if(document.save.enddate.value=="")
   { alert("结束日期不能为空！");
     document.save.enddate.focus();
     return (false);
   }
   if(document.save.title.value=="")
   { alert("计划主题不能为空！");
     document.save.title.focus();
     return (false);
   }
   if(document.save.content.value=="")
   { alert("内容不能为空！");
     document.save.content.focus();
     return (false);
   }
   
   
   return true;
}
function sendForm()
{
   if(CheckForm())
      document.save.submit();
}
</script>
<form name="save" method="post" action="?ac=edit&do=save&fileurl=plan">
	<input type="hidden" name="savetype" value="edit" />
	<input type="hidden" name="id" value="<?=$plan['id']?>" />
<table class="TableTop" width="90%">
   <tr>
      <td class="left"></td>
      <td class="center">计划预计进行时间</td>
      <td class="right"></td>
   </tr>
</table>
 <table class="TableBlock no-top-border" width="90%">
             <?php
			$startdate=explode(' ',$plan['startdate']); 
			$starth=explode(':',$startdate[1]); 
            ?>
    <tr>
      <td nowrap class="TableData" width="15%"> 开始日期：<? get_user_add_help()?></td>
      <td class="TableData">
	  <input type="text" name="startdate" class="BigInput" size="15" value="<?=$startdate[0]?>" onClick="WdatePicker();"/> 时间：<select name="starth">
			    
			    <?php
				for($i=1;$i<=23;$i++){
				if (strlen($i)<2){
				$j="0".$i;
				}else{
				$j=$i;
				}
				?>
				<option value="<?=$j?>" <?php if($starth[0]==$j){?>selected="selected"<?php }?>><?=$j?></option>
				<?php } ?>
				</select>
				点
				：<select name="starti">
			    
			    <?php
				for($i=1;$i<=59;$i++){
				if (strlen($i)<2){
				$j="0".$i;
				}else{
				$j=$i;
				}
				?>
				<option value="<?=$j?>" <?php if($starth[1]==$j){?>selected="selected"<?php }?>><?=$j?></option>
				<?php } ?>
				</select>分	</td>
    </tr>
	<?php
			$enddate=explode(' ',$plan['enddate']); 
			$endh=explode(':',$enddate[1]); 
            ?>
    <tr>
      <td nowrap class="TableData"> 结束日期：<? get_user_add_help()?></td>
      <td class="TableData">
<input type="text" name="enddate" class="BigInput" size="15" value="<?=$enddate[0]?>" onClick="WdatePicker();"/> 时间：<select name="endh">
			    
			    <?php
				for($i=1;$i<=23;$i++){
				if (strlen($i)<2){
				$j="0".$i;
				}else{
				$j=$i;
				}
				?>
				<option value="<?=$j?>" <?php if($endh[0]==$j){?>selected="selected"<?php }?>><?=$j?></option>
				<?php } ?>
				</select>
				点
				：<select name="endi">
			   
			    <?php
				for($i=1;$i<=59;$i++){
				if (strlen($i)<2){
				$j="0".$i;
				}else{
				$j=$i;
				}
				?>
				<option value="<?=$j?>" <?php if($endh[1]==$j){?>selected="selected"<?php }?>><?=$j?></option>
				<?php } ?>
				</select>分
      </td>
    </tr>
	<tr>
      <td nowrap class="TableHeader" colspan="2"><b>&nbsp;计划信息</b></td>
    </tr>
	
	
	 <tr>
      <td nowrap class="TableData"> 计划主题：<? get_user_add_help()?></td>
      <td class="TableData">
	   <input type="text" name="title" class="BigInput" size="40" value="<?=$plan['title']?>" />
      </td>
    </tr>
</table>
<table  width="90%" style="border-left:#CCCCCC solid 1px;border-right:#CCCCCC solid 1px;border-bottom:#CCCCCC solid 1px;">
    <tr>
      <td width="15%"  style="border-right:#CCCCCC solid 1px;">&nbsp;内容：<? get_user_add_help()?></td>
      <td width="85%" style="padding-top:10px; padding-bottom:10px; padding-left:3px;"><script charset="utf-8" src="eweb/kindeditor.js"></script>
<script>
        KE.show({
                id : 'content'
        });
</script>
		<textarea name="content" cols="70" rows="12" class="input" style="width:600px;height:300px;"><?=$plan['content']?></textarea>	 
      </td>
    </tr>
</table>
  <table class="TableBlock no-top-border" width="90%"> 
 
     <tr>
      <td nowrap class="TableData" width="15%"> 发布部门：</td>
      <td class="TableData">
	  <?php
	  get_oa_department_public(2,"department",$plan['department'],"+选择部门",60,3)
	  ?>
	  </td>
    </tr>
	<tr>
      <td nowrap class="TableData" width="15%"> 负责人：</td>
      <td class="TableData">
	  
	  <?php
	  get_oa_member_public(2,"person",$plan['person'],"+选择负责人",60,3)
	  ?>
	  &nbsp;&nbsp;&nbsp;&nbsp;<?php get_sms_info_phone_box("负责人","person")?>
	  </td>
    </tr>
	<tr>
      <td nowrap class="TableData" width="15%"> 参与人员：</td>
      <td class="TableData">
	  
	  <?php
	  get_oa_member_public(2,"participation",$plan['participation'],"+选择人员",60,3)
	  ?>
	  &nbsp;&nbsp;&nbsp;&nbsp;<?php get_sms_info_phone_box("参与人员","participation")?>
	  
	  </td>
    </tr>
 	<tr>
      <td nowrap class="TableData" width="15%"> 备注：</td>
      <td class="TableData"><textarea name="note" cols="70" rows="5" class="BigInput"><?=$plan['note']?></textarea></td>
    </tr>
		<tr>
      <td nowrap class="TableData" width="15%"> 计划设置：</td>
      <td class="TableData"><input name="type" type="radio" value="个人" style="border:0;" <?php if($plan['type']=='个人'){ ?>checked="checked"<?php } ?>/>个人
			<input name="type" type="radio" style="border:0;" value="部门" <?php if($plan['type']=='部门'){ ?>checked="checked"<?php } ?> />
			部门	</td>
    </tr>
 
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap height="35">

                    <?php
						if($plan['completiondate']!=''){
						//echo "已完成";
						}else{
						
						
						?>
					<input type="button" name="Submit" value="保存信息" class="BigButton" onclick="sendForm();">   <input type="submit" name="Submit" value="完成" class="BigButton"> 
					
					
					<?php }?>
      </td>
    </tr>
  </table>
</form>
</div>
</div>
 

 
</body>
</html>
